package pack3;

import pack3.utils.Utils;

import java.util.Arrays;

public class BubuerSort {
    public static void main(String[] args) {
        int []arr=new int[]{7,5,6,9,10,1,3,7,4,3,2};
        bulberSort(arr);
        System.out.println(Arrays.toString(arr));
    }

    public static void bulberSort(int[]arr){
        for (int i = 0; i < arr.length; i++) {
            for (int j = 0; j < arr.length-i-1; j++) {
                if(arr[j]>arr[j+1]){
                    Utils.swap(arr,j,j+1);
                }
            }
        }
    }
}
